/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 小梅就是酱子
 * Date: 2022-02-04
 * Time: 16:23
 */
public class 检查数组的有序性 {
    public static void main(String[] args) {
        int[] array={1,4,3,2,6};
        System.out.println(check(array));
    }
    public static boolean check(int[] array){
        int i=array[0];
        for(;i< array.length-1;i++){
            if(array[i+1]<array[i]){
               return false;
            }
        }
        return true;
    }
}
